<template>
	<div>
		<Toggle v-model="value" style="margin:20px"/>
		<Toggle v-model="value" style="margin:20px" open="开" close="关"/>
		<Toggle v-model="value" :width="50" style="margin:20px" open="启用" close="停用"/>
		<Toggle v-model="value" color="green" :width="40" style="margin:20px" open="启用" close="停用">
			<template #open>on</template>
			<template #close>off</template>
		</Toggle>
		<Toggle v-model="value" disable style="margin:20px"/>
		<Toggle v-model="value" disable style="margin:20px" open="开" close="关"/>
		{{value}}
		<br>
		自定义值
		<Toggle v-model="value3" :true-value="1" :false-value="0" style="margin:20px" open="开" close="关"/>
		{{value3}}
		<br/>
		<Toggle v-model="value2" val="val1" style="margin:20px"/>
		<Toggle v-model="value2" val="val2" style="margin:20px"/>
		<Toggle v-model="value2" val="val3" style="margin:20px"/>
		<Toggle v-model="value2" val="val4" style="margin:20px"/>
		{{Array.from(value2)}}
	</div>
</template>

<script>
import Toggle from '@/components/pc/toggle';
import {MySet} from '@/util/polyfill';

export default {
	name:'index',
	components:{
		Toggle,
	},
	data(){
		return {
			value:false,
			value2:new MySet(),
			value3:1,
		};
	},
	methods:{
	}
};
</script>

<style lang="scss">

</style>
